package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzTaskEquipmentUserMapper;
import com.ruoyi.business.domain.CzTaskEquipmentUser;
import com.ruoyi.business.service.ICzTaskEquipmentUserService;

/**
 * 任务人员设备关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-01
 */
@Service
public class CzTaskEquipmentUserServiceImpl implements ICzTaskEquipmentUserService 
{
    @Autowired
    private CzTaskEquipmentUserMapper czTaskEquipmentUserMapper;

    /**
     * 查询任务人员设备关联
     * 
     * @param id 任务人员设备关联主键
     * @return 任务人员设备关联
     */
    @Override
    public CzTaskEquipmentUser selectCzTaskEquipmentUserById(String id)
    {
        return czTaskEquipmentUserMapper.selectCzTaskEquipmentUserById(id);
    }

    /**
     * 查询任务人员设备关联列表
     * 
     * @param czTaskEquipmentUser 任务人员设备关联
     * @return 任务人员设备关联
     */
    @Override
    public List<CzTaskEquipmentUser> selectCzTaskEquipmentUserList(CzTaskEquipmentUser czTaskEquipmentUser)
    {
        return czTaskEquipmentUserMapper.selectCzTaskEquipmentUserList(czTaskEquipmentUser);
    }

    /**
     * 新增任务人员设备关联
     * 
     * @param czTaskEquipmentUser 任务人员设备关联
     * @return 结果
     */
    @Override
    public int insertCzTaskEquipmentUser(CzTaskEquipmentUser czTaskEquipmentUser)
    {
        czTaskEquipmentUser.setCreateTime(DateUtils.getNowDate());
        return czTaskEquipmentUserMapper.insertCzTaskEquipmentUser(czTaskEquipmentUser);
    }

    /**
     * 修改任务人员设备关联
     * 
     * @param czTaskEquipmentUser 任务人员设备关联
     * @return 结果
     */
    @Override
    public int updateCzTaskEquipmentUser(CzTaskEquipmentUser czTaskEquipmentUser)
    {
        czTaskEquipmentUser.setUpdateTime(DateUtils.getNowDate());
        return czTaskEquipmentUserMapper.updateCzTaskEquipmentUser(czTaskEquipmentUser);
    }

    /**
     * 批量删除任务人员设备关联
     * 
     * @param ids 需要删除的任务人员设备关联主键
     * @return 结果
     */
    @Override
    public int deleteCzTaskEquipmentUserByIds(String[] ids)
    {
        return czTaskEquipmentUserMapper.deleteCzTaskEquipmentUserByIds(ids);
    }

    /**
     * 删除任务人员设备关联信息
     * 
     * @param id 任务人员设备关联主键
     * @return 结果
     */
    @Override
    public int deleteCzTaskEquipmentUserById(String id)
    {
        return czTaskEquipmentUserMapper.deleteCzTaskEquipmentUserById(id);
    }
}
